/*
 * UMediaSinkArray.h
 *
 *  Created on: 2015-12-31
 *      Author: terry
 */

#ifndef UMEDIASINKARRAY_H_
#define UMEDIASINKARRAY_H_

#include "UMediaSource.h"
#include "TCriticalSection.h"
#include <deque>
#include <algorithm>
#include <errno.h>

class UMediaSinkArrayPrivate;


class DLLEXPORT UMediaSinkArray
{
public:
	UMediaSinkArray();

	~UMediaSinkArray();

	size_t size();

	bool addSink(UMediaSink* pSink);

	bool removeSink(UMediaSink* pSink);

	void removeSinks();

	size_t getSinkCount();

	bool exists(UMediaSink* sink);

    void fireMediaFormat(const UMediaFormat& fmt);

    void fireMediaPacket(UMediaPacket& pkt);

    void fireMediaEvent(int event);

protected:

protected:
    UMediaSinkArrayPrivate*	m_pimp;

};





#endif /* UMEDIASINKARRAY_H_ */
